package com.crm.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@Entity
@Table(name="comments")
@ApiModel("评论")
public class Comments implements Serializable{

	private static final long serialVersionUID = 1L;

	@Id
	@GenericGenerator(name = "system-uuid", strategy = "uuid2")
	@GeneratedValue(generator = "system-uuid")
	@ApiModelProperty(value="评论id",required=true,hidden = true)
	private String id;
	
	@ApiModelProperty(value="评论用户")
	private String userName;
	
	@ApiModelProperty(value="评论内容",required=true)
	private String content;
	
	@ApiModelProperty(value="评论时间",required=true,hidden = true)
	private Date addTime;
	
	@ApiModelProperty(value="评论话题",required=true)
	private String topicId;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getAddTime() {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	public String getTopicId() {
		return topicId;
	}

	public void setTopicId(String topicId) {
		this.topicId = topicId;
	}

	@Override
	public String toString() {
		return "Comments [id=" + id + ", userName=" + userName + ", content=" + content + ", addTime=" + addTime
				+ ", topicId=" + topicId + "]";
	}
	
}
